package com.yiwei.zhh.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by xsooy-pc on 2017/7/24.
 */

public class DealBeforeModel extends ResponseModel implements Parcelable {


    /**
     * data : {"idcard":{"is_auth":"1","title":"身份认证","desc":"找花花需要知道你的身份哦","alert":"简单身份认证，即可获得最高1000元额度，确定放弃吗？"},"bankcard":{"is_auth":"1","title":"收款银行卡","desc":"添加银行卡就可以获取额度啦","alert":"额度已经获取，填下收款银行卡就能借钱了，真的要放弃吗？(>_<)"},"xuexin":{"is_auth":"0","title":"学历认证","desc":"找花花需要知道你的学历哦","alert":""}}
     */

    public DataBean data;

    public static class DataBean implements Parcelable {
        /**
         * idcard : {"is_auth":"1","title":"身份认证","desc":"找花花需要知道你的身份哦","alert":"简单身份认证，即可获得最高1000元额度，确定放弃吗？"}
         * bankcard : {"is_auth":"1","title":"收款银行卡","desc":"添加银行卡就可以获取额度啦","alert":"额度已经获取，填下收款银行卡就能借钱了，真的要放弃吗？(>_<)"}
         * xuexin : {"is_auth":"0","title":"学历认证","desc":"找花花需要知道你的学历哦","alert":""}
         */
        public String sta;
        public String alert;
        public ItemBean idcard;
        public ItemBean bankcard;
        public ItemBean xuexin;

        public static class ItemBean implements Parcelable {
            /**
             * is_auth : 1
             * title : 收款银行卡
             * desc : 添加银行卡就可以获取额度啦
             * alert : 额度已经获取，填下收款银行卡就能借钱了，真的要放弃吗？(>_<)
             */

            public String is_auth;
            public String title;
            public String desc;
            public String alert;

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(this.is_auth);
                dest.writeString(this.title);
                dest.writeString(this.desc);
                dest.writeString(this.alert);
            }

            public ItemBean() {
            }

            protected ItemBean(Parcel in) {
                this.is_auth = in.readString();
                this.title = in.readString();
                this.desc = in.readString();
                this.alert = in.readString();
            }

            public static final Parcelable.Creator<ItemBean> CREATOR = new Parcelable.Creator<ItemBean>() {
                @Override
                public ItemBean createFromParcel(Parcel source) {
                    return new ItemBean(source);
                }

                @Override
                public ItemBean[] newArray(int size) {
                    return new ItemBean[size];
                }
            };

            @Override
            public String toString() {
                return "ItemBean{" +
                        "is_auth='" + is_auth + '\'' +
                        ", title='" + title + '\'' +
                        ", desc='" + desc + '\'' +
                        ", alert='" + alert + '\'' +
                        '}';
            }
        }


        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.sta);
            dest.writeString(this.alert);
            dest.writeParcelable(this.idcard, flags);
            dest.writeParcelable(this.bankcard, flags);
            dest.writeParcelable(this.xuexin, flags);
        }

        public DataBean() {
        }

        protected DataBean(Parcel in) {
            this.sta = in.readString();
            this.alert = in.readString();
            this.idcard = in.readParcelable(ItemBean.class.getClassLoader());
            this.bankcard = in.readParcelable(ItemBean.class.getClassLoader());
            this.xuexin = in.readParcelable(ItemBean.class.getClassLoader());
        }

        public static final Creator<DataBean> CREATOR = new Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel source) {
                return new DataBean(source);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(this.data, flags);
    }

    public DealBeforeModel() {
    }

    protected DealBeforeModel(Parcel in) {
        this.data = in.readParcelable(DataBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<DealBeforeModel> CREATOR = new Parcelable.Creator<DealBeforeModel>() {
        @Override
        public DealBeforeModel createFromParcel(Parcel source) {
            return new DealBeforeModel(source);
        }

        @Override
        public DealBeforeModel[] newArray(int size) {
            return new DealBeforeModel[size];
        }
    };
}
